package com.yupi.springbootinit.service;

public interface OutboxService {

    /**
     * 入库 Outbox 事件（若 eventId 为空则自动生成 UUID）
     */
    void enqueue(String eventId, String eventType, String routingKey, Object payload);

    default void enqueue(String eventType, String routingKey, Object payload) {
        enqueue(null, eventType, routingKey, payload);
    }
}